/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.h2t.loveplace.views.containers;

import com.sun.lwuit.Button;
import com.sun.lwuit.Container;
import com.sun.lwuit.Image;
import com.sun.lwuit.events.ActionListener;
import com.sun.lwuit.layouts.BorderLayout;
import java.io.IOException;

/**
 *
 * @author PHANHAI
 */
public class FooterContainer extends Container {
    private Button btnBack;
    
    public FooterContainer() {
        Image imgBack = null;
        try { 
            imgBack = Image.createImage("/photo/softkey_back.png");
        } catch (IOException ex) {
            ex.printStackTrace();
        }
        btnBack = new Button();
        if(imgBack != null) {
            btnBack.getStyle().setBgImage(imgBack);
        }
        BorderLayout footerLayout = new BorderLayout();
        footerLayout.setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_CENTER);
        setLayout(footerLayout);
        addComponent(BorderLayout.EAST, btnBack);
    }
    
    public void onBackPressed(ActionListener ac) {
        btnBack.addActionListener(ac);
    }
}
